package router

import (
	"api-gateway/basic/config"
	"api-gateway/handler/api"
	"api-gateway/midderware"
	"github.com/gin-gonic/gin"
)

func CutPrice(v1 *gin.RouterGroup) {
	cutPrice := v1.Group("/cutPrice")
	{
		cutPrice.POST("/createCutActivity", api.CreateCutActivity)  // 创建砍价活动
		cutPrice.POST("/addCutGoods", api.AddCutGoods)              // 添加砍价商品
		cutPrice.GET("/getCutGoodsList", api.GetCutGoodsList)       // 获取砍价商品列表
		cutPrice.GET("/getCutActivityList", api.GetCutActivityList) // 砍价活动列表
		cutPrice.Use(midderware.JWTAuth(config.KEY_JWT))
		cutPrice.POST("/helpCutPrice", api.HelpCutPrice)                      // 帮忙砍价
		cutPrice.POST("/userJoinCutActivity", api.UserJoinCutActivityReq)     // 参与砍价活动
		cutPrice.POST("/getCutInvitationCode", api.GetCutInvitationCode)      // 生成邀请码
		cutPrice.GET("/cutGoodsDetail", api.CutGoodsDetail)                   // 砍价商品详情
		cutPrice.GET("/getCutActivityDetail", api.GetCutActivityDetail)       // 砍价活动详情
		cutPrice.GET("/getUserToHelpList", api.GetUserToHelpList)             // 用户帮助砍价列表
		cutPrice.GET("/getUserHelpList", api.GetUserHelpList)                 // 用户被帮助表列表
		cutPrice.GET("/getUserJoinActivityList", api.GetUserJoinActivityList) // 用户帮助的砍价活动记录列表
		cutPrice.POST("/updateCutActivity", api.UpdateCutActivity)            // 修改砍价活动
		cutPrice.POST("/updateCutGoods", api.UpdateCutGoods)                  // 修改砍价商品
		cutPrice.GET("/detailCutActivity", api.DetailCutActivity)             // 砍价活动详情
		cutPrice.POST("/detailCutJoin", api.DelCutJoin)                       // 删除砍价参与记录
		cutPrice.POST("/detailCutGoods", api.DelCutGoods)                     // 删除砍价商品
		cutPrice.POST("/detailCutActivity", api.DelCutActivity)               // 删除砍价活动
		cutPrice.GET("/listJoin", api.ListJoin)                               // 参与记录列表
		cutPrice.GET("/listHelp", api.ListHelp)                               // 帮助列表
	}
}
